﻿
//namespace Skynet.ServiceImplementation
//{
//    using System;
//    using System.Collections.Generic;
//    using System.ComponentModel;
//    using System.ComponentModel.DataAnnotations;
//    using System.Data;
//    using System.Linq;
//    using System.ServiceModel.DomainServices.EntityFramework;
//    using System.ServiceModel.DomainServices.Hosting;
//    using System.ServiceModel.DomainServices.Server;
//    using Skynet.BusinessEntities;


//    // Implements application logic using the SkyNetLibraryEntities context.
//    // TODO: Add your application logic to these methods or in additional methods.
//    // TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
//    // Also consider adding roles to restrict access as appropriate.
//    // [RequiresAuthentication]
//    [EnableClientAccess()]
//    public class SkynetTest : LinqToEntitiesDomainService<SkyNetLibraryEntities>
//    {

//        // TODO:
//        // Consider constraining the results of your query method.  If you need additional input you can
//        // add parameters to this method or create additional query methods with different names.
//        // To support paging you will need to add ordering to the 'Alternatives' query.
//        public IQueryable<Alternative> GetAlternatives()
//        {
//            return this.ObjectContext.Alternatives;
//        }

//        public void InsertAlternative(Alternative alternative)
//        {
//            if ((alternative.EntityState != EntityState.Detached))
//            {
//                this.ObjectContext.ObjectStateManager.ChangeObjectState(alternative, EntityState.Added);
//            }
//            else
//            {
//                this.ObjectContext.Alternatives.AddObject(alternative);
//            }
//        }

//        public void UpdateAlternative(Alternative currentAlternative)
//        {
//            this.ObjectContext.Alternatives.AttachAsModified(currentAlternative, this.ChangeSet.GetOriginal(currentAlternative));
//        }

//        public void DeleteAlternative(Alternative alternative)
//        {
//            if ((alternative.EntityState == EntityState.Detached))
//            {
//                this.ObjectContext.Alternatives.Attach(alternative);
//            }
//            this.ObjectContext.Alternatives.DeleteObject(alternative);
//        }
//    }
//}


